package com.acme.bankapp.domain.bank;

public class SavingAccount extends AbstractAccount {

	public SavingAccount(double amount) {
		super(amount);
	}

	@Override
	public void deposit(double amount) {
		balance += amount;
	}

	@Override
	public void withdraw(double amount) {
		if (balance > amount)
			balance -= amount;
	}

	@Override
	public double maximumAmountToWithdraw() {
		return balance;
	}
}
